
/**
 * @fileoverview slider serves as the main component of HTML Image Slider.
 * @author honza.rychtar@gmail.com (Jan Rychtar)
 */


goog.provide('georeferencer.chart');

goog.require('georeferencer.chart.Handler');
goog.require('georeferencer.chart.Sector');
goog.require('goog.graphics.Path');
goog.require('goog.graphics');
goog.require('goog.events');
goog.require('goog.ui.Bubble');
goog.require('goog.events');
goog.require('goog.dom');

//goog.require('georeferencer.slider.Dragger');

georeferencer.chart.main = function() {   
  
  

  
 // var georeferenced = new georeferencer.chart.Item("georeferenced" , 20, "blue", 323);
//  var skipped = new georeferencer.chart.Item("skipped" , 70, "green", 33);
//  var no = new georeferencer.chart.Item("no" , 10, "red", 3);
  
  var query = georeferencer.chart.main.getUrlParameter("sql");
  //console.log(query); 
  georeferencer.chart.myHandler = new georeferencer.chart.Handler(query, 1500);
  
 // console.log(handler);
  //handler.drawChart(georeferenced, skipped, no);
// georeferencer.chart.Handler.drawChart(georeferenced, skipped, no);
};


georeferencer.chart.getData = function(data) {
  georeferencer.chart.myHandler.createPie(data);
}






georeferencer.chart.main.getUrlParameter = function(key) {
  var query = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
  for(var i = 0; i < query.length; i++) {
    keyValue = query[i].split('=');	  
    if(keyValue[0] == key) {
      return query[i].substring(keyValue[0].length + 1, query[i].length);
    }
  }
  return "";
};



goog.exportSymbol('main', georeferencer.chart.main);
goog.exportSymbol('getData', georeferencer.chart.getData);
